<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">-->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

    <link rel="stylesheet" href="../../taofang/css/xiangxixinxi.css">
    <link rel="stylesheet" href="../../taofang/plugins/bootstrap-3.3.7-dist/css/bootstrap.css">
    <link rel="stylesheet" href="../../taofang/css/TenantCentre.css">
    <!--聊天室-->
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="../../taofang/plugins/jquery-3.4.1.js"></script>
    <script src="../../taofang/plugins/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <link href="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/css/datetimepicker.css"
          rel="stylesheet">
    <script src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>

    <!--    聊天室-->

    <script type="text/javascript">


    </script>

</head>
<body>

<%@ include file="../nav/headnav.jsp" %>

<div class="a">

    <div class="container">
        <div class="row first-row">
            <div class="col-md-4">
                <div class="row">
                    <div class="col-md-3" style="padding: 0px;padding-left: 5px;">
                        <h3>${house.region}</h3>
                    </div>
                    <div class="col-md-3" style="padding: 0px">
                        <h3>${house.rentType}</h3>
                    </div>
                    <div class="col-md-3" style="padding: 0px">
                        <h3>${house.houseType}</h3>
                    </div>
                    <div class="col-md-3" style="padding: 0px">
                        <h3></h3>
                    </div>
                </div>
                <div style="padding: 0px">
                    <b>房源编号:&nbsp;</b><b>${house.id}</b>
                </div>
                <div class="col-md-8">
                    <p></p>
                </div>
            </div>
        </div>
        <div class="row second-row">
            <div class="col-md-6">
                <div id="demo" class="carousel slide">

                    <!-- 轮播begin -->
                    <div id="myCarousel" class="carousel slide col-sm-12 col-md-9"
                         style="float: right;width:100%;">
                        <!-- 轮播（Carousel）指标 -->
                        <ol class="carousel-indicators">
                            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                            <li data-target="#myCarousel" data-slide-to="1"></li>
                            <li data-target="#myCarousel" data-slide-to="2"></li>
                            <li data-target="#myCarousel" data-slide-to="3"></li>
                            <li data-target="#myCarousel" data-slide-to="4"></li>
                            <li data-target="#myCarousel" data-slide-to="5"></li>
                            <li data-target="#myCarousel" data-slide-to="6"></li>
                            <li data-target="#myCarousel" data-slide-to="7"></li>
                            <li data-target="#myCarousel" data-slide-to="8"></li>
                            <li data-target="#myCarousel" data-slide-to="9"></li>
                        </ol>
                        <!-- 轮播（Carousel）项目 -->
                        <div class="carousel-inner">
                            <div class="item active">
                                <img src="../../taofang/img/1.jpg" alt="First slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/2.jpg" alt="Second0 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/3.jpg" alt="Second1 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/4.jpg" alt="Second2 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/5.jpg" alt="Second3 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/6.jpg" alt="Second4 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/7.jpg" alt="Second5 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/2.jpg" alt="Second6 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/9.jpg" alt="Second7 slide">
                            </div>
                            <div class="item">
                                <img src="../../taofang/img/3.jpg" alt="Second8 slide">
                            </div>
                        </div>
                        <!-- 轮播（Carousel）导航 -->
                        <a class="carousel-control left" href="#myCarousel"
                           data-slide="prev"><span _ngcontent-c3="" aria-hidden="true"
                                                   class="glyphicon glyphicon-chevron-left"></span></a>
                        <a class="carousel-control right" href="#myCarousel"
                           data-slide="next"><span _ngcontent-c3="" aria-hidden="true"
                                                   class="glyphicon glyphicon-chevron-right"></span></a>
                    </div>
                    <!-- 轮播end -->
                </div>
            </div>


            <!--        轮播图右侧信息-->
            <div class="col-md-6" style="border: 1px gainsboro solid">
                <div class="row" style="border-bottom: 1px gainsboro solid">
                    <div class="col-md-12" style="margin-bottom: 5%;margin-top: 5%">
                        <div class="row">
                            <div class="col-md-2" style="padding:0px;">
                                <h3><a>${house.rentType}</a></h3>
                            </div>
                            <div class="col-md-3" style="padding:0px;">
                                <h3><a style="color: red">${cost.rentMoney}元/月</a></h3>
                            </div>

                            <div class="col-md-5">

                            </div>

                            <div class="col-md-2" >
                                <input id="ifconcern" type="button" value="关注" onclick="change(this)"/>
                                <!--                            <button>关注</button>-->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12" style="padding:3%;">
                        <div class="row">
                            <div class="col-md-4 " id="pet" name="pet">
                                <img src="../../taofang/img/11.png" style="height:80px;width:60%">
                                <div class="yuyue" style="padding-top: 15px;">
                                    <!--                                <phone> 联系电话-->
                                    <!--                                </phone>-->
                                    <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal2" onclick="iflogin()">
                                        联系电话
                                    </button>

                                </div>
                            </div>
                            <div class="col-md-8">
                                <div class="row">
                                    <div class="col-md-6">
                                        <a>经纪人姓名:</a>
                                    </div>
                                <div class="jjr1 col-md-6">
                                    <a>${agent.name}</a>
                                </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-4" style="margin-top: 3%">
                                        <a>评分</a>
                                    </div>
                                    <%--                                    <div class="col-md-5" style="margin-top: 3%">--%>
                                    <%--                                        <a>服务分数</a>--%>
                                    <%--                                    </div>--%>
                                    <%--                                    <div class="col-md-4" style="margin-top: 3%">--%>
                                    <%--                                        <a>${evaluate.serviceGradee}</a>--%>
                                    <%--                                    </div>--%>
                                    <%--                                    <div class="col-md-3" style="margin-top: 3%">--%>

                                    <%--                                    </div>--%>
                                    <%--                                    <div class="col-md-5" style="margin-top: 3%">--%>
                                    <%--                                        <a>消息分数</a>--%>
                                    <%--                                    </div>--%>
                                    <%--                                    <div class="col-md-4" style="margin-top: 3%">--%>
                                    <%--                                        <a>${evaluate.infoGrade}</a>--%>
                                    <%--                                    </div>--%>
                                    <div class="col-md-8" style="margin-top: 3%">
                                        <a>${evaluate.grade}</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12" style="padding:3%;">
                        <div class="row rowst">
                            <div class="col-md-4">
                                <img src="../../taofang/img/12.png" style="height:120px;width:80%;">
                            </div>
                            <div class="col-md-4">

                                <div class="liaotian" style="padding-top: 15px;text-align:center;">
                                    <!--                              <a href="#" style="border: 2px black solid; ">预约经纪人 </a>-->
                                    <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal3">
                                        在线聊
                                    </button>
                                </div>
                                <div class="yuyue" style="padding-top: 15px;text-align:center;">
                                    <!--                              <a href="#" style="border: 2px black solid; ">预约经纪人 </a>-->

                                    <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                                        预约经纪人
                                    </button>
                                </div>


                            </div>
                            <div class="col-md-4">
                                <img src="../../taofang/img/13.png" style="height:120px;width:80%;">
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <!--    预约模态框-->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content" style="width: 600px;height:600px;">
                    <div class="modal-header">
                        <h4 class="modal-title" id="myModalLabel" style="margin-top: 10px">预约经纪人</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>

                    </div>
                    <div class="modal-body">
                        <div class="container-fluid">
                            <div class="col-md-12" style="padding:3%;">
                                <div class="row">
                                    <div class="col-md-4">
                                        <img src="../../taofang/img/2.jpg" style="height:120px;">
                                    </div>
                                    <div class="col-md-8">
                                        <div class="row">
                                            <div class="col-md-2" style="padding: 0px;padding-left: 5px;">
                                                <h3>${house.region}</h3>
                                            </div>
                                            <div class="col-md-3" style="padding: 0px;">
                                                <h3>${house.rentType}</h3>
                                            </div>
                                            <div class="col-md-3" style="padding: 0px;">
                                                <h3>${house.houseType}</h3>
                                            </div>
                                            <div class="col-md-4" style="padding: 0px;">
                                                <h3>${appointment_time.appointmentState}</h3>
                                            </div>
                                        </div>
                                        <div class="col-md-12" style="padding:0px;margin-top:50px;">
                                            <h3><a style="color: red">${cost.rentMoney}元/月</a></h3>
                                        </div>
                                    </div>
                                    <form role="form">
                                        <div class="col-md-12">

                                            <div class="col-md-6" style="padding:0px;margin-top:50px;">
                                                <div class="control-group">
                                                    <label class="control-label">看房日期</label>
                                                    <div class="controls input-append date form_date" data-date=""
                                                         data-date-format="dd MM yyyy"
                                                         data-link-field="appointment_date"
                                                         data-link-format="yyyy-mm-dd">
                                                        <input class="form-control" size="24" type="text" value="" readonly>
                                                        <span class="add-on"><i class="icon-remove"></i></span>
                                                        <span class="add-on"><i class="icon-th"></i></span>
                                                    </div>
                                                    <input type="hidden" id="appointment_date" value=""/><br/>
                                                    <input type="hidden" class="input-text" value="${house.id}"
                                                           name="houseId" id="houseId">
                                                    <input type="hidden" class="input-text" value="${agent.id}"
                                                           name="agentId" id="agentId">
                                                    <input type="hidden" class="input-text" value="${tenant_id}"
                                                           name="tenantId" id="tenantId">
                                                </div>
                                            </div>
                                            <div class="col-md-6" style="padding:0px;margin-top:50px;">
                                                <div class="form-group">
                                                    <label>看房时间</label>
                                                    <select id="time_quantum" class="form-control" >
                                                        <option>上午</option>
                                                        <option>下午</option>
                                                        <option>晚上</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <%--                                            <button type="button" class="btn "  >关闭</button>--%>
                                            <button type="button" class="btn btn-primary btn-default" onclick="checkname()" data-dismiss="modal">提交更改</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>

                        <!--    联系电话模态框-->

                        <div class="modal fade" id="myModal2" tabindex="-1" role="dialog"
                             aria-labelledby="myModalLabel2"
                             aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content" style="width: 600px;height:200px;">
                                    <div class="modal-header">
                                        <h4 class="modal-title" id="myModalLabel2">联系电话</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>

                                    </div>
                                    <div class="modal-body">
                                        <phone>${agent.phone}</phone>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                    </div>
                                </div><!-- /.modal-content -->
                            </div><!-- /.modal -->
                        </div>


                        <!--    在线聊模态框-->

                        <div class="modal fade" id="myModal3" tabindex="-1" role="dialog"
                             aria-labelledby="myModalLabel3"
                             aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content" style="width: 600px;height:650px;">
                                    <div class="modal-header">
                                        <h4 class="modal-title" id="myModalLabel3">聊天室</h4>
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>

                                    </div>
                                    <!--聊天室-->
                                    <div class="talk_con">
                                        <div class="talk_show" id="words">
                                            <div class="atalk"><span id="asay">A说：吃饭了吗？</span></div>
                                            <div class="btalk"><span id="bsay">B说：还没呢，你呢？</span></div>
                                        </div>
                                        <div class="talk_input">
                                            <select class="whotalk" id="who">
                                                <option value="0">A说：</option>
                                                <option value="1">B说：</option>
                                            </select>
                                            <input type="text" class="talk_word" id="talkwords">
                                            <input type="button" value="发送" class="talk_sub" id="talksub">
                                        </div>
                                    </div>
                                </div><!-- /.modal-content -->
                            </div><!-- /.modal -->
                        </div>


                        <!--锚点-->
                        <div class="carousel-inner" style="text-align: center;background-color: gainsboro">
                            <div class="maodian" style="text-align: center;">
                                <div class="row rowm">
                                    <div class="col-md-2">
                                        <h5><a href="#miao1">基本信息</a></h5>
                                    </div>
                                    <div class="col-md-2">
                                        <h5><a href="#miao2">周边环境</a></h5>
                                    </div>
                                    <div class="col-md-2">
                                        <h5><a href="#miao3">配套设备</a></h5>
                                    </div>
                                    <div class="col-md-2">
                                        <h5><a href="#miao4">费用详情</a></h5>
                                    </div>
                                    <div class="col-md-2">
                                        <h5><a href="#miao5">房屋评价</a></h5>
                                    </div>
                                    <div class="col-md-2">
                                        <h5><a href="#miao6">频率走势</a></h5>
                                    </div>

                                </div>
                            </div>
                        </div>

                        <!--房屋信息-->
                        <div class="fangwuxinxi" style="margin: 20px; ">
                            <div class="row">
                                <div class="col-md-12" style="margin-bottom: 10px">
                                    <h1>房屋信息</h1>
                                </div>
                                <div class="col-md-12">
                                    <div class="col-md-4" id="miao1">
                                        <a>基本信息</a>
                                    </div>
                                    <div class="col-md-8">
                                        <div class="row rowhouse">
                                            <div class="col-md-6">
                                                <a>${house.houseType}</a>
                                            </div>
                                            <div class="col-md-6">
                                                <a>${house.area}</a>
                                            </div>
                                            <div class="col-md-6">
                                                <a>${house.floor}</a>
                                            </div>


                                            <div class="col-md-6">
                                                <c:if test="${house.parkPlace}">
                                                    <a>车位：有</a>
                                                </c:if>
                                                <c:if test="${!house.parkPlace}">
                                                    <a>车位：无</a>
                                                </c:if>
                                            </div>


                                            <div class="col-md-6">
                                                <a>${house.tenancy}</a>
                                            </div>

                                            <div class="col-md-6">
                                                <a>${house.orientate}</a>
                                            </div>

                                            <div class="col-md-6">
                                                <a>${house.region}</a>
                                            </div>

                                            <div class="col-md-6">
                                                <a>${house.rentType}</a>
                                            </div>


                                        </div>
                                    </div>
                                </div>
                                <!--周边环境-->
                                <div class="col-md-12">
                                    <div class="col-md-4" id="miao2">
                                        <a>周边环境</a>
                                    </div>
                                    <div class="col-md-8">
                                        <div class="row">
                                            <c:if test="${environmentFacility.greenery=='true'}">
                                                <div class="col-md-6">
                                                    <a>绿化多</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.trafficConvenient=='true'}">
                                                <div class="col-md-6">
                                                    <a>交通便利</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.shoppingConvenient=='true'}">
                                                <div class="col-md-6">
                                                    <a>购物方便</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.schoolNearbyHouse=='true'}">
                                                <div class="col-md-6">
                                                    <a>学区房</a>
                                                </div>
                                            </c:if>
                                        </div>
                                    </div>
                                </div>
                                <!--配套设备-->
                                <div class="col-md-12">
                                    <div class="col-md-4" id="miao3">
                                        <a>配套设施</a>
                                    </div>
                                    <div class="col-md-8">
                                        <div class="row rowp">
                                            <c:if test="${environmentFacility.fridge}">
                                                <div class="col-md-6">
                                                    <a>冰箱</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.television}">
                                                <div class="col-md-6">
                                                    <a>电视</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.washingMachine}">
                                                <div class="col-md-6">
                                                    <a>洗衣机</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.geyser}">
                                                <div class="col-md-6">
                                                    <a>热水器</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.airCondition}">
                                                <div class="col-md-6">
                                                    <a>空调</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.broadband}">
                                                <div class="col-md-6">
                                                    <a>宽带</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.sofa}">
                                                <div class="col-md-6">
                                                    <a>沙发</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.bed}">
                                                <div class="col-md-6">
                                                    <a>床</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.heat}">
                                                <div class="col-md-6">
                                                    <a>暖气</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.wardrobe}">
                                                <div class="col-md-6">
                                                    <a>衣柜</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.cookingable}">
                                                <div class="col-md-6">
                                                    <a>可做饭</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.bathroom}">
                                                <div class="col-md-6">
                                                    <a>卫生间</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.balcony}">
                                                <div class="col-md-6">
                                                    <a>阳台</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.intelligentLock}">
                                                <div class="col-md-6">
                                                    <a>智能门锁</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.rangeHood}">
                                                <div class="col-md-6">
                                                    <a>油烟机</a>
                                                </div>
                                            </c:if>
                                            <c:if test="${environmentFacility.gasStove}">
                                                <div class="col-md-6">
                                                    <a>燃气灶</a>
                                                </div>
                                            </c:if>
                                        </div>
                                    </div>
                                </div>
                                <!--            费用-->
                                <div class="col-md-12">
                                    <div class="col-md-4" id="miao4">
                                        <a>费用详情</a>
                                    </div>
                                    <div class="col-md-8">
                                        <div class="row">
                                            <div class="col-md-2">
                                                <a>租金</a>
                                            </div>
                                            <div class="col-md-10">
                                                <a>${cost.rentMoney}</a>
                                            </div>
                                            <div class="col-md-2">
                                                <a>押金</a>
                                            </div>
                                            <div class="col-md-10">
                                                <a>${cost.deposit}</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--            评价-->
                                <div class="col-md-12">
                                    <div class="col-md-4" id="miao5">
                                        <a>房屋评价</a>
                                    </div>
                                    <div class="col-md-8">
                                        <div>
                                            <a>${house.houseEvaluate}</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--底部导航栏-->
                    <%@ include file="../nav/footnav.jsp" %>
                    <!--底部导航栏end-->
                    <script type="text/javascript">

                        function iflogin() {
                            let agent_id = $("#agentId").val();
                            agent_id="";
                            if(agent_id=="")
                            {
                                alert("请先登录")
                                $("#myModal2").remove();
                            }

                        }

                        function checkname() {
                            let agent_id = $("#agentId").val();
                            let tenant_id = $("#tenantId").val();
                            let house_id = $("#houseId").val();
                            let appointment_state = $("#appointment_state").val();
                            let appointment_date = $("#appointment_date").val();
                            let time_quantum = $("#time_quantum").val();
                            let datas = {
                                "agent_id": agent_id,
                                "tenant_id": tenant_id,
                                "house_id": house_id,
                                "appointment_state": appointment_state,
                                "appointment_date": appointment_date,
                                "time_quantum": time_quantum
                            }
                            // let flag = true;
                            $.get('/taofang/appointment/agent.action', datas, function (data) {
                                alert(data.msg);
                                // flag = false;
                            })
                        }

                        $(function () {
                            let tenant_id = $("#tenantId").val();
                            let house_id = $("#houseId").val();
                            let divs = document.getElementById("ifconcern");
                            let datas = {
                                "tenant_id": tenant_id,
                                "house_id": house_id
                            }
                            $.get('/taofang/appointment/concern.action', datas, function (data) {
                                if(data.code==200){
                                    divs.style.background= "red";
                                }
                                else{
                                    divs.style.background= "white";
                                }
                            })

                        });
                        function change(btn) {
                            let tenant_id = $("#tenantId").val();
                            let house_id = $("#houseId").val();
                            let datas = {
                                "tenant_id": tenant_id,
                                "house_id": house_id
                            }
                            $.get('/taofang/appointment/changeconcern.action', datas, function (data) {
                                if(data.code==202){
                                    btn.style.background = "red";
                                }
                                else{
                                    btn.style.background = "white";
                                }
                            })
                        }


                        window.onload = function () {
                            var Words = document.getElementById("words");
                            var Who = document.getElementById("who");
                            var TalkWords = document.getElementById("talkwords");
                            var TalkSub = document.getElementById("talksub");


                            TalkSub.onclick = function () {
                                //定义空字符串
                                var str = "";
                                if (TalkWords.value == "") {
                                    // 消息为空时弹窗
                                    alert("消息不能为空");
                                    return;
                                }
                                if (Who.value == 0) {
                                    //如果Who.value为0n那么是 A说
                                    str = '<div class="atalk"><span>A说 :' + TalkWords.value + '</span></div>';
                                } else {
                                    str = '<div class="btalk"><span>B说 :' + TalkWords.value + '</span></div>';
                                }
                                Words.innerHTML = Words.innerHTML + str;
                            }

                        }

                        function clickMode(id) {
                            $('#' + id).modal({backdrop: 'static', keyboard: false});
                        }

                        $(function () {
                            $(".form_date").datetimepicker({
                                format: 'yyyy-mm-dd',
                                todayBtn: true,
                                maxView: 'year',
                                minView: 'month'
                            });
                        });


                    </script>


</body>
</html>